package org.xtext.runtime.eis;

import org.xtext.runtime.formula.Predicate;
import org.xtext.runtime.term.ITerm;
import org.xtext.runtime.term.Term;

public class EISEvent {
	String type;
	Object[] arguments;
	
	public EISEvent(String type, Object[] arguments) {
		this.type = type;
		this.arguments = arguments;
	}
	
	public Predicate toPredicate() {
		ITerm[] terms = new ITerm[arguments.length];
		for (int i=0;i<arguments.length; i++) {
			terms[i] = Term.newInstance(arguments[i]);
		}
		return new Predicate(type, terms);
	}
}
